package com.zy.thread.bank3;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/12/14 13:00
 **/
public class Account {
    private int money;//

    public void addMoney(double amt){
        money+=amt;
        try {
            Thread.sleep(10);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName()+"线程存完的额度为:"+money);
    }
    Account(int money){
        this.money = money;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }


}
